// <copyright file="StackedBarChart.aspx.cs" company="YUIAsp.Net">
// Copyright (c) 2009 All Right Reserved
// </copyright>
// <author>raul popescu</author>
// <email>dev@yuiasp.net</email>
// <date>2009-01-30</date>
// <summary>YUIAsp.Net File</summary>

using System;
using YUIAspNet;

namespace YUIAspNetDemo.Chart
{
    public partial class StackedBarChart : BaseDemoPage
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            LocalDataSource src = new LocalDataSource();

            src.AddColumn("year");
            src.AddColumn("revenue");
            src.AddColumn("expense");
            src.AddColumn("income");

            src.AddRow(2003, 500, 200, 700);
            src.AddRow(2004, 800, 400, 900);
            src.AddRow(2005, 950, 600, 2000);
            src.AddRow(2006, 1700, 900, 2300);

            this.chart.Source = src;

            this.chart.XAxis = new NumericAxis { EnableStacking=true}; 
        }
    }
}
